import {CANG_INCRE, CANG_DECRE} from '../constants';
export default function cangReducer(cang=0, action){
    switch(action.type){
        case CANG_INCRE:
            return cang + action.data;
        
        case CANG_DECRE:
            return cang - action.data;
        
        default: 
            return cang;
    }
}